# $Id: PKGBUILD 80901 2012-12-06 09:48:40Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: sputnick <gilles DOT quenot AT gmail DOT com>

pkgname=xwax
pkgver=1.3
pkgrel=1
pkgdesc='Open-source vinyl emulation software for Linux.'
arch=('i686' 'x86_64')
url='http://www.xwax.co.uk/'
license=('GPL')
depends=('alsa-lib' 'sdl_ttf' 'ttf-dejavu')
optdepends=('cdparanoia: for CD import'
            'mpg123: for MP3 import'
            'ffmpeg: for video fallback import')
source=("http://www.xwax.co.uk/releases/${pkgname}-${pkgver}.tar.gz")
md5sums=('10c3b923eab17377705b1dea89edf6fb')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # patch "rig.c" to use Arch Linux's default rtprio value
  sed -i 's/^#define REALTIME_PRIORITY 80/#define REALTIME_PRIORITY 65/' rig.c

  ./configure --enable-alsa --prefix /usr
  make EXECDIR="/usr/share/${pkgname}"
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" EXECDIR="/usr/share/${pkgname}" install
}
